package com.googlecode.iiddefecttracker.domain;

import org.apache.commons.lang.builder.EqualsBuilder;
import org.apache.commons.lang.builder.HashCodeBuilder;

/**
 * Bean implementation of {@link Project}.
 */
public class ProjectBeanImpl implements Project {
    
    private Long id;
    private String name;
    private String version;
    private String description;
    
    @Override
    public boolean equals(final Object obj) {
        if (obj instanceof ProjectBeanImpl == false) {
            return false;
        }
        if (this == obj) {
            return true;
        }
        final ProjectBeanImpl rhs = (ProjectBeanImpl) obj;
        
        return EqualsBuilder.reflectionEquals(this, rhs);
    }
    
    public String getDescription() {
        return description;
    }
    
    public Long getId() {
        return id;
    }
    
    public String getName() {
        return name;
    }
    
    public String getVersion() {
        return version;
    }
    
    @Override
    public int hashCode() {
        return HashCodeBuilder.reflectionHashCode(this);
    }
    
    public void setDescription(final String description) {
        this.description = description;
    }
    
    public void setId(final Long id) {
        this.id = id;
    }
    
    public void setName(final String name) {
        this.name = name;
    }
    
    public void setVersion(final String version) {
        this.version = version;
    }
    
}
